package p270jp.pxv.android.viewholder;

import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.recyclerview.widget.RecyclerView;
import p045be.C1060c;
import p134ei.AnalyticsAction;
import p270jp.pxv.android.R;
import p270jp.pxv.android.model.AppApiSketchLive;
import p314lg.ViewHolderHorizontalLayoutLiveBinding;
import p677zi.PixivImageLoader;

/* renamed from: jp.pxv.android.viewholder.HorizontalLayoutLiveViewHolder */
/* loaded from: classes2.dex */
public class HorizontalLayoutLiveViewHolder extends RecyclerView.AbstractC0819y {
    private final ViewHolderHorizontalLayoutLiveBinding binding;
    private final PixivImageLoader pixivImageLoader;
    private final int imageWidth = this.itemView.getResources().getDimensionPixelSize(R.dimen.horizontal_live_module_width);
    private final int imageHeight = this.itemView.getResources().getDimensionPixelSize(R.dimen.horizontal_live_module_height);

    private HorizontalLayoutLiveViewHolder(ViewHolderHorizontalLayoutLiveBinding m6Var, PixivImageLoader aVar) {
        super(m6Var.f2666e);
        this.binding = m6Var;
        this.pixivImageLoader = aVar;
    }

    public static HorizontalLayoutLiveViewHolder createViewHolder(ViewGroup viewGroup, PixivImageLoader aVar) {
        return new HorizontalLayoutLiveViewHolder((ViewHolderHorizontalLayoutLiveBinding) C1060c.m10358a(viewGroup, R.layout.view_holder_horizontal_layout_live, viewGroup, false), aVar);
    }

    public void setLive(AppApiSketchLive appApiSketchLive, AnalyticsAction aVar) {
        this.binding.f21930q.m4489c(appApiSketchLive, aVar);
        this.binding.f21930q.setCroppedInternalTitleVisibility(0);
        ImageView imageView = this.binding.f21930q.getBinding().f22355s;
        this.pixivImageLoader.m54l(imageView.getContext(), appApiSketchLive.thumbnailImageUrl, this.imageWidth, this.imageHeight, imageView, 15);
        this.binding.m11392i();
    }
}
